<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>继承的概念 | JavaScript 高级</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.2.0">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
    

        
    
    
    <link rel="next" href="../e9c9c586570ff813bf127694b025d155/9c3f525ec8bdda16f7618bcb3c936b98.html" />
    
    
    <link rel="prev" href="../e9c9c586570ff813bf127694b025d155/40a6014bee4d6724e7aa800253818de5.html" />
    

        
    </head>
    <body>
        
        
    <div class="book" data-level="1.3" data-basepath=".." data-revision="Tue Mar 01 2016 06:46:18 GMT+0800 (CST)">
    

<div class="book-summary">
    <div class="book-search">
        <input type="text" placeholder="Type to search" class="form-control" />
    </div>
    <ul class="summary">
        
        
        
        

        

        
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        JavaScript 高级
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="e9c9c586570ff813bf127694b025d155/index.html">
            
                
                    <a href="../e9c9c586570ff813bf127694b025d155/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        面向对象进阶
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="e9c9c586570ff813bf127694b025d155/c46418c7328d2a8b05cd6ccedd603f88.html">
            
                
                    <a href="../e9c9c586570ff813bf127694b025d155/c46418c7328d2a8b05cd6ccedd603f88.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        面向对象基础复习
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="e9c9c586570ff813bf127694b025d155/40a6014bee4d6724e7aa800253818de5.html">
            
                
                    <a href="../e9c9c586570ff813bf127694b025d155/40a6014bee4d6724e7aa800253818de5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        原型的基本概念
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="1.3" data-path="e9c9c586570ff813bf127694b025d155/f93b5f4ffff4f7cc386af737772af5d5.html">
            
                
                    <a href="../e9c9c586570ff813bf127694b025d155/f93b5f4ffff4f7cc386af737772af5d5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        继承的概念
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="e9c9c586570ff813bf127694b025d155/9c3f525ec8bdda16f7618bcb3c936b98.html">
            
                
                    <a href="../e9c9c586570ff813bf127694b025d155/9c3f525ec8bdda16f7618bcb3c936b98.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        Object 对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="e9c9c586570ff813bf127694b025d155/3c5d0a2365c2b15c5839ac6e1de9f9ea.html">
            
                
                    <a href="../e9c9c586570ff813bf127694b025d155/3c5d0a2365c2b15c5839ac6e1de9f9ea.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        Function 对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="e9c9c586570ff813bf127694b025d155/3db73eb5d8866141920eb0d067ba68c3.html">
            
                
                    <a href="../e9c9c586570ff813bf127694b025d155/3db73eb5d8866141920eb0d067ba68c3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        作用域链
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="e9c9c586570ff813bf127694b025d155/7c0fb98a684b27a818b1b546418cb62c.html">
            
                
                    <a href="../e9c9c586570ff813bf127694b025d155/7c0fb98a684b27a818b1b546418cb62c.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        闭包的基本概念
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="e9c9c586570ff813bf127694b025d155/bec81e72f2f0c7d6d17bd137036d3286.html">
            
                
                    <a href="../e9c9c586570ff813bf127694b025d155/bec81e72f2f0c7d6d17bd137036d3286.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.8.</b>
                        
                        getter 与 setter
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="e2bb52a93f2a04d3848c6bc059d4442d/index.html">
            
                
                    <a href="../e2bb52a93f2a04d3848c6bc059d4442d/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        面向对象高级
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="e2bb52a93f2a04d3848c6bc059d4442d/5d3938919f20993f4b502f77cb59536f.html">
            
                
                    <a href="../e2bb52a93f2a04d3848c6bc059d4442d/5d3938919f20993f4b502f77cb59536f.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        原型链
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="e2bb52a93f2a04d3848c6bc059d4442d/b8c198488b5b2ca72efdae292161824f.html">
            
                
                    <a href="../e2bb52a93f2a04d3848c6bc059d4442d/b8c198488b5b2ca72efdae292161824f.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        函数的四中调用模式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="e2bb52a93f2a04d3848c6bc059d4442d/0f37e1ef8250b257649a6d584bd33fb6.html">
            
                
                    <a href="../e2bb52a93f2a04d3848c6bc059d4442d/0f37e1ef8250b257649a6d584bd33fb6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        对象的创建模式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="e2bb52a93f2a04d3848c6bc059d4442d/4fa341af02385d07831cfb4509d5bd20.html">
            
                
                    <a href="../e2bb52a93f2a04d3848c6bc059d4442d/4fa341af02385d07831cfb4509d5bd20.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        继承的方式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="e2bb52a93f2a04d3848c6bc059d4442d/a8d890e0bae896874f9af984daf86a53.html">
            
                
                    <a href="../e2bb52a93f2a04d3848c6bc059d4442d/a8d890e0bae896874f9af984daf86a53.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        闭包案例
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="e2bb52a93f2a04d3848c6bc059d4442d/6cc37fe6e9df40a64594e3417c638703.html">
            
                
                    <a href="../e2bb52a93f2a04d3848c6bc059d4442d/6cc37fe6e9df40a64594e3417c638703.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        正则表达式对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="e2bb52a93f2a04d3848c6bc059d4442d/0e3ef80c8612c6c6eb5baa8f397b9494.html">
            
                
                    <a href="../e2bb52a93f2a04d3848c6bc059d4442d/0e3ef80c8612c6c6eb5baa8f397b9494.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        XMLHttpRequest 对象
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


        
        <li class="divider"></li>
        <li>
            <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                Published with GitBook
            </a>
        </li>
        
    </ul>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header">
    <!-- Actions Left -->
    <a href="#" class="btn pull-left toggle-summary" aria-label="Table of Contents"><i class="fa fa-align-justify"></i></a>
    <a href="#" class="btn pull-left toggle-search" aria-label="Search"><i class="fa fa-search"></i></a>
    
    <div id="font-settings-wrapper" class="dropdown pull-left">
        <a href="#" class="btn toggle-dropdown" aria-label="Font Settings"><i class="fa fa-font"></i>
        </a>
        <div class="dropdown-menu font-settings">
    <div class="dropdown-caret">
        <span class="caret-outer"></span>
        <span class="caret-inner"></span>
    </div>

    <div class="buttons">
        <button type="button" id="reduce-font-size" class="button size-2">A</button>
        <button type="button" id="enlarge-font-size" class="button size-2">A</button>
    </div>

    <div class="buttons font-family-list">
        <button type="button" data-font="0" class="button">Serif</button>
        <button type="button" data-font="1" class="button">Sans</button>
    </div>

    <div class="buttons color-theme-list">
        <button type="button" id="color-theme-preview-0" class="button size-3" data-theme="0">White</button>
        <button type="button" id="color-theme-preview-1" class="button size-3" data-theme="1">Sepia</button>
        <button type="button" id="color-theme-preview-2" class="button size-3" data-theme="2">Night</button>
    </div>
</div>

    </div>

    <!-- Actions Right -->
    
    <div class="dropdown pull-right">
        <a href="#" class="btn toggle-dropdown" aria-label="Share"><i class="fa fa-share-alt"></i>
        </a>
        <div class="dropdown-menu font-settings dropdown-left">
            <div class="dropdown-caret">
                <span class="caret-outer"></span>
                <span class="caret-inner"></span>
            </div>
            <div class="buttons">
                <button type="button" data-sharing="twitter" class="button">
                    Share on Twitter
                </button>
                <button type="button" data-sharing="google-plus" class="button">
                    Share on Google
                </button>
                <button type="button" data-sharing="facebook" class="button">
                    Share on Facebook
                </button>
                <button type="button" data-sharing="weibo" class="button">
                    Share on Weibo
                </button>
                <button type="button" data-sharing="instapaper" class="button">
                    Share on Instapaper
                </button>
            </div>
        </div>
    </div>
    

    
    <a href="#" target="_blank" class="btn pull-right google-plus-sharing-link sharing-link" data-sharing="google-plus" aria-label="Google"><i class="fa fa-google-plus"></i></a>
    
    
    <a href="#" target="_blank" class="btn pull-right facebook-sharing-link sharing-link" data-sharing="facebook" aria-label="Facebook"><i class="fa fa-facebook"></i></a>
    
    
    <a href="#" target="_blank" class="btn pull-right twitter-sharing-link sharing-link" data-sharing="twitter" aria-label="Twitter"><i class="fa fa-twitter"></i></a>
    
    
    


    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >JavaScript 高级</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="%E7%BB%A7%E6%89%BF%E7%9A%84%E6%A6%82%E5%BF%B5">&#x7EE7;&#x627F;&#x7684;&#x6982;&#x5FF5;</h1>
<p>&#x4E3B;&#x8981;&#x5185;&#x5BB9;:</p>
<ul>
<li>&#x7EE7;&#x627F;&#x7684;&#x6982;&#x5FF5;</li>
<li>&#x539F;&#x578B;&#x7EE7;&#x627F;&#x7684;&#x6982;&#x5FF5;</li>
<li><code>Object.prototype</code></li>
<li>&#x4E00;&#x79CD;&#x7EE7;&#x627F;&#x7684;&#x5B9E;&#x73B0;</li>
</ul>
<p>JavaScript &#x662F;&#x57FA;&#x4E8E;&#x9762;&#x5411;&#x5BF9;&#x8C61;&#x7684;&#x7F16;&#x7A0B;&#x8BED;&#x8A00;, &#x7EE7;&#x627F;&#x662F;&#x5176;&#x4E2D;&#x6BD4;&#x8F83;&#x91CD;&#x8981;&#x7684;&#x6982;&#x5FF5;. &#x63A5;&#x4E0B;&#x6765;&#x8BE6;&#x7EC6;&#x8BA8;&#x8BBA;&#x7EE7;&#x627F;&#x7684;&#x57FA;&#x672C;&#x5185;&#x5BB9;.</p>
<h2 id="%E7%BB%A7%E6%89%BF%E7%9A%84%E6%A6%82%E5%BF%B5">&#x7EE7;&#x627F;&#x7684;&#x6982;&#x5FF5;</h2>
<p>&#x5728;&#x5F00;&#x53D1;&#x8FC7;&#x7A0B;&#x4E2D;, &#x9762;&#x5411;&#x5BF9;&#x8C61;&#x662F;&#x4E00;&#x79CD;&#x5904;&#x7406;&#x4EE3;&#x7801;&#x7684;&#x601D;&#x8003;&#x65B9;&#x5F0F;. &#x5728;&#x9762;&#x5411;&#x5BF9;&#x8C61;&#x4E2D;&#x7EE7;&#x627F;&#x5C31;&#x662F;&#x5176;&#x4E2D;&#x4E00;&#x4E2A;&#x975E;&#x5E38;&#x91CD;&#x8981;&#x7684;&#x6982;&#x5FF5;. &#x63A5;&#x4E0B;&#x6765;&#x672C;&#x8282;&#x8BE6;&#x7EC6;&#x8BA8;&#x8BBA;&#x7EE7;&#x627F;&#x7684;&#x6982;&#x5FF5;.</p>
<h3 id="%E4%B8%BA%E4%BD%95%E9%9C%80%E8%A6%81%E4%BD%BF%E7%94%A8%E7%BB%A7%E6%89%BF">&#x4E3A;&#x4F55;&#x9700;&#x8981;&#x4F7F;&#x7528;&#x7EE7;&#x627F;</h3>
<p>&#x5728;&#x5F00;&#x53D1;&#x4E2D;, &#x7ECF;&#x5E38;&#x4F1A;&#x53D1;&#x73B0;&#x591A;&#x4E2A;&#x4E0D;&#x540C;&#x7C7B;&#x578B;&#x7684;&#x5BF9;&#x8C61;&#x90FD;&#x6709;&#x5171;&#x540C;&#x7684;&#x65B9;&#x6CD5;. &#x4F8B;&#x5982;&#x4EE3;&#x7801;:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">var</span> o1 = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Number</span>(<span class="hljs-number">144</span>);
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;&#x6253;&#x5370; Number &#x5BF9;&#x8C61; o1 = &quot;</span> + o1);
<span class="hljs-keyword">var</span> o2 = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>();
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;&#x6253;&#x5370; Date &#x5BF9;&#x8C61; o2 = &quot;</span> + o2);
<span class="hljs-keyword">var</span> o3 = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Array</span>(<span class="hljs-number">1</span>, <span class="hljs-number">4</span>, <span class="hljs-number">4</span>);
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;&#x6253;&#x5370; Array &#x5BF9;&#x8C61; o3 = &quot;</span> + o3);
<span class="hljs-keyword">var</span> o4 = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(<span class="hljs-string">&quot;a test&quot;</span>);
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;&#x6253;&#x5370; Error &#x5BF9;&#x8C61; o4 = &quot;</span> + o4);
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">MyConstructor</span>(<span class="hljs-params"></span>) </span>{
}
<span class="hljs-keyword">var</span> o5 = <span class="hljs-keyword">new</span> MyConstructor();
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;&#x6253;&#x5370;&#x81EA;&#x5B9A;&#x4E49;&#x5BF9;&#x8C61; MyConstructor o5 = &quot;</span> + o5);
</code></pre>
<p>&#x5728;&#x672C;&#x4F8B;&#x4E2D;, &#x6253;&#x5370;&#x5BF9;&#x8C61;&#x90FD;&#x6709;&#x4E00;&#x4E2A;&#x5171;&#x540C;&#x7684;&#x64CD;&#x4F5C;, &#x5373; &quot;&#x548C;&#x5B57;&#x7B26;&#x4E32;&#x76F8;&#x8FDE;&#x63A5;&quot;. &#x8BE5;&#x64CD;&#x4F5C;&#x5728;&#x6267;&#x884C;&#x7684;&#x65F6;&#x5019;, &#x4F1A;&#x81EA;&#x52A8;&#x7684;&#x8C03;&#x7528;&#x4E00;&#x4E2A;&#x65B9;&#x6CD5;, &#x5373; <code>toSting()</code> &#x65B9;&#x6CD5;. &#x56E0;&#x6B64;, &#x6267;&#x884C;&#x4EE3;&#x7801;</p>
<pre><code class="lang-javascript"><span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;&#x6253;&#x5370;&#x81EA;&#x5B9A;&#x4E49;&#x5BF9;&#x8C61; MyConstructor o5 = &quot;</span> + o5);
</code></pre>
<p>&#x7B49;&#x4EF7;&#x4E8E;&#x6267;&#x884C;&#x4EE3;&#x7801;</p>
<pre><code class="lang-javascript"><span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;&#x6253;&#x5370;&#x81EA;&#x5B9A;&#x4E49;&#x5BF9;&#x8C61; MyConstructor o5 = &quot;</span> + o5.toString());
</code></pre>
<p>&#x90A3;&#x4E48;&#x95EE;&#x9898;&#x6765;&#x4E86;, &#x8FD9;&#x4E2A;&#x7C7B;&#x578B;&#x4E2D;&#x6CA1;&#x6709;&#x6CA1;&#x6709;&#x5B9A;&#x4E49; <code>toString()</code> &#x65B9;&#x6CD5;&#x5462;? &#x5F88;&#x663E;&#x7136;&#x662F;&#x6CA1;&#x6709;&#x7684;. &#x90A3;&#x4E48;&#x5982;&#x4F55;&#x5B9E;&#x73B0;?</p>
<p>&#x5176;&#x5B9E;&#x5F88;&#x7B80;&#x5355;, &#x5C31;&#x662F;&#x4E3A;&#x4E86; <span style="font-weight:bolder;color:red;">&quot;&#x590D;&#x7528;&quot;</span>.</p>
<p>&#x5728;&#x5F00;&#x53D1;&#x4E2D;&#x5E38;&#x5E38;&#x4F1A;&#x6709;&#x91CD;&#x590D;&#x7684;&#x64CD;&#x4F5C;, &#x4F8B;&#x5982;&#x9875;&#x9762;&#x4E0A;&#x5F88;&#x591A;&#x4E1C;&#x897F;&#x90FD;&#x53EF;&#x4EE5;&#x70B9;&#x51FB;; &#x4E00;&#x4E2A;&#x6E38;&#x620F;&#x4E2D;, &#x5E38;&#x5E38;&#x4F1A;&#x6709;&#x89D2;&#x8272;&#x53EF;&#x4EE5;&#x8D70;&#x52A8;&#x7B49;&#x7B49;. <strong>&#x56E0;&#x6B64;&#x5C06;&#x91CD;&#x590D;&#x6267;&#x884C;&#x7684;&#x4EE3;&#x7801;&#x63D0;&#x53D6;&#x51FA;&#x6765;, &#x4E0D;&#x7528;&#x518D;&#x7F16;&#x5199;&#x4EE3;&#x7801;&#x7684;&#x65F6;&#x5019;&#x6BCF;&#x6B21;&#x90FD;&#x8981;&#x5C06;&#x5176;&#x518D;&#x5199;&#x4E00;&#x904D;. &#x90A3;&#x4E48;&#x8FD9;&#x79CD;&#x62FF;&#x6765;&#x4E3B;&#x4E49;&#x5C31;&#x662F;&#x7EE7;&#x627F;. </strong></p>
<p>&#x5728;&#x7EE7;&#x627F;&#x4E2D;, &#x4E00;&#x4E2A;&#x5BF9;&#x8C61;&#x7EE7;&#x627F;&#x81EA;&#x53E6;&#x4E00;&#x4E2A;&#x5BF9;&#x8C61;. &#x7EE7;&#x627F;&#x7684;&#x5BF9;&#x8C61;&#x4E2D;&#x5305;&#x542B;&#x88AB;&#x7EE7;&#x627F;&#x5BF9;&#x8C61;&#x7684;&#x6240;&#x6709;&#x6210;&#x5458;.</p>
<p>&#x4F8B;&#x5982;&#x4EBA;&#x4F1A;&#x8BF4;&#x8BDD;, &#x90A3;&#x4E48;&#x5C06;&#x8BF4;&#x8BDD;&#x7684;&#x529F;&#x80FD;&#x63D0;&#x53D6;&#x51FA;&#x6765;&#x4F5C;&#x4E3A;&#x4E00;&#x4E2A;&#x5BF9;&#x8C61;. &#x7EE7;&#x627F;&#x81EA;&#x8BE5;&#x5BF9;&#x8C61;&#x7684;&#x7F8E;&#x56FD;&#x4EBA;, &#x65E5;&#x672C;&#x4EBA;, &#x6216;&#x662F;&#x82F1;&#x56FD;&#x4EBA;&#x5C31;&#x90FD;&#x5177;&#x6709;&#x8BF4;&#x8BDD;&#x7684;&#x65B9;&#x6CD5;&#x4E86;.</p>
<p><img src="../images/Snip20160211_46.png" alt=""></p>
<p>&#x56E0;&#x6B64;&#x4E00;&#x53E5;&#x8BDD;&#x603B;&#x7ED3;&#x7EE7;&#x627F;, &#x5C31;&#x662F; <span style="font-weight:bolder;color:red;">&quot;&#x4E3A;&#x4E86;&#x5077;&#x61D2;, &#x5C31;&#x62FF;&#x6765;&#x4E3B;&#x4E49;&quot;</span>.</p>
<h3 id="%E7%BB%A7%E6%89%BF%E7%9A%84%E5%AE%9E%E7%8E%B0%E6%96%B9%E5%BC%8F">&#x7EE7;&#x627F;&#x7684;&#x5B9E;&#x73B0;&#x65B9;&#x5F0F;</h3>
<p>&#x7EE7;&#x627F;&#x7684;&#x5B9E;&#x73B0;&#x65B9;&#x5F0F;&#x6709;&#x5F88;&#x591A;&#x79CD;, &#x5982;&#x4ECA;&#x4E3B;&#x6D41;&#x7684;&#x7EE7;&#x627F;&#x6709;&#x7C7B;&#x7EE7;&#x627F;&#x548C;&#x539F;&#x578B;&#x7EE7;&#x627F;. &#x7C7B;&#x7EE7;&#x627F;&#x7684;&#x8BED;&#x8A00;&#x6709;: C++, Java, C# &#x7B49;, &#x800C;&#x539F;&#x578B;&#x7EE7;&#x627F;&#x6709;: Self, Io, JavaScript &#x7B49;.</p>
<h4 id="c-%E4%B8%AD%E5%9F%BA%E4%BA%8E%E7%B1%BB%E7%9A%84%E7%BB%A7%E6%89%BF">C# &#x4E2D;&#x57FA;&#x4E8E;&#x7C7B;&#x7684;&#x7EE7;&#x627F;</h4>
<p>&#x5728;&#x57FA;&#x4E8E;&#x7C7B;&#x7EE7;&#x627F;&#x7684;&#x7F16;&#x7A0B;&#x8BED;&#x8A00;&#x4E2D;, &#x6709;&#x4E00;&#x4E2A;&#x5BF9;&#x8C61;&#x7684;&#x6A21;&#x677F;, &#x79F0;&#x4E4B;&#x4E3A;&#x7C7B;. &#x9700;&#x8981;&#x5BF9;&#x8C61;&#x5219;&#x9996;&#x5148;&#x8BBE;&#x8BA1;&#x4E00;&#x4E2A;&#x7C7B;, &#x7531;&#x7C7B;&#x6765;&#x521B;&#x5EFA;&#x5BF9;&#x8C61;. &#x800C;&#x7EE7;&#x627F;&#x662F;&#x6307;&#x7C7B;&#x4E4B;&#x95F4;&#x7684;&#x7EE7;&#x627F;.</p>
<p>&#x4F8B;&#x5982;&#x5199;&#x4E00;&#x4E2A;&#x7236;&#x7C7B;</p>
<pre><code class="lang-csharp"><span class="hljs-keyword">class</span> <span class="hljs-title">BaseClass</span> {
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">SayHello</span>(<span class="hljs-params"></span>) </span>{
        System.Console.WriteLine(<span class="hljs-string">&quot;&#x4F60;&#x597D;&quot;</span>);
    }
}
</code></pre>
<p>&#x7136;&#x540E;&#x63D0;&#x4F9B;&#x4E00;&#x4E2A;&#x5B50;&#x7C7B;</p>
<pre><code class="lang-csharp"><span class="hljs-keyword">class</span> <span class="hljs-title">SubClass</span> : <span class="hljs-title">BaseClass</span> {
}
</code></pre>
<p>&#x6700;&#x540E;&#x76F4;&#x63A5;&#x521B;&#x5EFA;&#x5B50;&#x7C7B;&#x72EC;&#x4EAB;, &#x5373;&#x53EF;&#x8C03;&#x7528;&#x65B9;&#x6CD5;</p>
<pre><code class="lang-csharp"><span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">Main</span>(<span class="hljs-params"><span class="hljs-keyword">string</span>[] args</span>) </span>{
    SubClass o = <span class="hljs-keyword">new</span> SubClass();
    o.SayHello(); <span class="hljs-comment">// =&gt; &#x4F60;&#x597D;</span>
}
</code></pre>
<p>&#x8FD9;&#x91CC;&#x7684;&#x7EE7;&#x627F;&#x5B9E;&#x9645;&#x4E0A;&#x662F;&#x5229;&#x7528;&#x6A21;&#x677F;&#x6765;&#x5B9E;&#x73B0;&#x7684;. &#x5728;&#x6A21;&#x677F; <code>BaseClass</code> &#x4E2D;&#x5B9A;&#x4E49;&#x4E86;&#x4E00;&#x4E2A;&#x65B9;&#x6CD5; <code>SayHello</code>, &#x7136;&#x540E;&#x8BBE;&#x8BA1;&#x4E00;&#x4E2A;&#x5B50;&#x7C7B; <code>SubClass</code> &#x7EE7;&#x627F;&#x81EA; <code>BaseClass</code>, &#x5728;&#x5B50;&#x7C7B;&#x4E2D;&#x6CA1;&#x6709;&#x89C4;&#x5B9A;&#x4EFB;&#x4F55;&#x4E1C;&#x897F;.  &#x4F46;&#x662F;&#x7531;&#x5B50;&#x7C7B;&#x521B;&#x5EFA;&#x51FA;&#x6765;&#x7684;&#x5BF9;&#x8C61;&#x5177;&#x6709; <code>SayHello</code> &#x65B9;&#x6CD5;,  &#x5E76;&#x4E14;&#x53EF;&#x4EE5;&#x8C03;&#x7528;.</p>
<p>&#x8FD9;&#x4E2A;&#x5C31;&#x662F;&#x5229;&#x7528;&#x7C7B;&#x7684;&#x7EE7;&#x627F;. &#x7C7B;&#x7EE7;&#x627F;&#x4E86;, &#x90A3;&#x4E48;&#x7531;&#x8BE5;&#x7C7B;&#x521B;&#x5EFA;&#x51FA;&#x6765;&#x7684;&#x5BF9;&#x8C61;&#x5C31;&#x5177;&#x6709;&#x88AB;&#x7EE7;&#x627F;&#x7684;&#x6210;&#x5458;.</p>
<h4 id="%E5%8E%9F%E5%9E%8B%E7%BB%A7%E6%89%BF">&#x539F;&#x578B;&#x7EE7;&#x627F;</h4>
<p>&#x4E0E;&#x7C7B;&#x7EE7;&#x627F;&#x4E0D;&#x540C;, &#x5728; JavaScript &#x4E2D;, &#x4F7F;&#x7528;&#x539F;&#x578B;&#x6765;&#x5B9E;&#x73B0;&#x7EE7;&#x627F;. &#x5728;&#x539F;&#x578B;&#x4E2D;&#x5B9A;&#x4E49;&#x7684;&#x6240;&#x6709;&#x6210;&#x5458;&#x90FD;&#x4F1A;&#x88AB;&#x5176;&#x6784;&#x9020;&#x65B9;&#x6CD5;&#x521B;&#x5EFA;&#x7684;&#x5BF9;&#x8C61;&#x6240;&#x7EE7;&#x627F;. &#x5728; JavaScript &#x4E2D;&#x4E0D;&#x5B58;&#x5728;&#x7C7B;&#x7684;&#x6982;&#x5FF5;, &#x56E0;&#x6B64;&#x5B9E;&#x73B0;&#x7EE7;&#x627F;&#x7684;&#x65B9;&#x5F0F;&#x4E5F;&#x4E0D;&#x518D;&#x552F;&#x4E00;&#x548C;&#x7EDF;&#x4E00;.</p>
<p>&#x8FD8;&#x662F;&#x8BF4;&#x8BDD;&#x7684;&#x4F8B;&#x5B50;, &#x4F7F;&#x7528; JavaScript &#x6765;&#x5B9E;&#x73B0;</p>
<pre><code class="lang-javascript"><span class="hljs-comment">// &#x5B9A;&#x4E49;&#x4E00;&#x4E2A;&#x5BF9;&#x8C61;, &#x5C06;&#x6765;&#x4F5C;&#x4E3A;&#x539F;&#x578B;&#x5BF9;&#x8C61;</span>
<span class="hljs-keyword">var</span> proto = {
    sayHello : <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
        <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;&#x4F60;&#x597D;!!!&quot;</span>);
    }};

<span class="hljs-comment">// &#x5B9A;&#x4E49;&#x4E00;&#x4E2A;&#x6784;&#x9020;&#x51FD;&#x6570;</span>
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Person</span>(<span class="hljs-params"></span>) </span>{
}

<span class="hljs-comment">// &#x8BBE;&#x7F6E; Person &#x7684;&#x539F;&#x578B;</span>
Person.prototype = proto;

<span class="hljs-comment">// &#x521B;&#x5EFA;&#x5BF9;&#x8C61;, &#x5177;&#x6709; sayHello &#x65B9;&#x6CD5;</span>
<span class="hljs-keyword">var</span> p = <span class="hljs-keyword">new</span> Person();
p.sayHello();
</code></pre>
<p>&#x5728;&#x672C;&#x4F8B;&#x4E2D;&#x6CA1;&#x6709;&#x7C7B;&#x7684;&#x6982;&#x5FF5;, &#x7EE7;&#x627F;&#x4E5F;&#x4E0D;&#x662F;&#x6A21;&#x677F;&#x4E4B;&#x95F4;&#x7684;&#x7EE7;&#x627F;. &#x800C;&#x662F;&#x7ED9;&#x6784;&#x9020;&#x65B9;&#x6CD5;&#x8BBE;&#x7F6E;&#x4E00;&#x4E2A;&#x539F;&#x578B;&#x5BF9;&#x8C61;, &#x7531;&#x8BE5;&#x6784;&#x9020;&#x51FD;&#x6570;&#x521B;&#x5EFA;&#x51FA;&#x6765;&#x7684;&#x5BF9;&#x8C61;&#x5C31;&#x5177;&#x6709;&#x8BE5;&#x539F;&#x578B;&#x5BF9;&#x8C61;&#x4E2D;&#x7684;&#x6240;&#x6709;&#x5185;&#x5BB9;. &#x6211;&#x4EEC;&#x79F0;&#x8FD9;&#x4E2A;&#x5BF9;&#x8C61;&#x5C31;&#x7EE7;&#x627F;&#x81EA;&#x539F;&#x578B;&#x5BF9;&#x8C61;.</p>
<p><em>&#x6CE8;&#x610F;: &#x524D;&#x9762;&#x66FE;&#x7ECF;&#x4ECB;&#x7ECD;&#x8FC7; <code>__proto__</code> &#x7684;&#x6982;&#x5FF5;, &#x56E0;&#x6B64;&#x5B9E;&#x73B0;&#x7EE7;&#x627F;&#x7684;&#x65B9;&#x6CD5;&#x4E5F;&#x5C31;&#x4E0D;&#x7EDF;&#x4E00;&#x4E86;, &#x6BD4;&#x8F83;&#x968F;&#x610F;.</em></p>
<p>&#x503C;&#x5F97;&#x8BF4;&#x660E;&#x7684;&#x662F;, &#x6240;&#x6709;&#x7531;&#x8BE5;&#x7C7B;&#x521B;&#x5EFA;&#x51FA;&#x6765;&#x7684;&#x5BF9;&#x8C61;, &#x90FD;&#x5177;&#x6709;&#x4E86;&#x539F;&#x578B;&#x4E2D;&#x5B9A;&#x4E49;&#x7684;&#x5C5E;&#x6027; (&#x65B9;&#x6CD5;). &#x4E0E;&#x5B9A;&#x4E49;&#x548C;&#x8BBE;&#x7F6E;&#x7684;&#x987A;&#x5E8F;&#x65E0;&#x5173;. &#x4F46;&#x662F;&#x5982;&#x679C;&#x91CD;&#x65B0;&#x8BBE;&#x7F6E;&#x5C5E;&#x6027;&#x5C31;&#x4E0D;&#x6B63;&#x786E;&#x4E86;.</p>
<p>&#x4F8B;&#x5982;, &#x4E0B;&#x9762;&#x7684;&#x4EE3;&#x7801;&#x53EF;&#x4EE5;&#x6B63;&#x5E38;&#x6267;&#x884C;.</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Person</span>(<span class="hljs-params"></span>) </span>{
}

<span class="hljs-keyword">var</span> p1 = <span class="hljs-keyword">new</span> Person();

Person.prototype.sayHello = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;hello, &#x4F60;&#x597D; JavaScript!&quot;</span>);
};

<span class="hljs-keyword">var</span> p2 = <span class="hljs-keyword">new</span> Person();

p1.sayHello(); <span class="hljs-comment">// =&gt; hello, &#x4F60;&#x597D; JavaScript!</span>
p2.sayHello(); <span class="hljs-comment">// =&gt; hello, &#x4F60;&#x597D; JavaScript!</span>
</code></pre>
<p>&#x4E0A;&#x9762;&#x7684;&#x4EE3;&#x7801;, &#x7ED9; <code>Person</code> &#x7684;&#x539F;&#x578B;&#x6DFB;&#x52A0;&#x4E86;&#x4E00;&#x4E2A; <code>sayHello</code> &#x65B9;&#x6CD5;, &#x56E0;&#x6B64;&#x4E24;&#x4E2A; <code>Person</code> &#x5BF9;&#x8C61;&#x90FD;&#x53EF;&#x4EE5;&#x8C03;&#x7528;&#x8BE5;&#x65B9;&#x6CD5;.</p>
<p>&#x5982;&#x679C;&#x662F;&#x76F4;&#x63A5;&#x91CD;&#x65B0;&#x8BBE;&#x7F6E;&#x6784;&#x9020;&#x51FD;&#x6570; <code>Person</code> &#x7684;&#x539F;&#x578B;&#x5BF9;&#x8C61;, &#x90A3;&#x4E48;&#x5C31;&#x4F1A;&#x62A5;&#x4E00;&#x4E2A; <code>TypeError</code> &#x5F02;&#x5E38;.</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Person</span>(<span class="hljs-params"></span>) </span>{
}

<span class="hljs-keyword">var</span> p1 = <span class="hljs-keyword">new</span> Person();

Person.prototype = { sayHello : <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;hello, &#x4F60;&#x597D; JavaScript!&quot;</span>);
}};

<span class="hljs-keyword">var</span> p2 = <span class="hljs-keyword">new</span> Person();

p1.sayHello(); <span class="hljs-comment">// =&gt; &#x5F02;&#x5E38;</span>
p2.sayHello();
</code></pre>
<p>&#x539F;&#x56E0;&#x5F88;&#x7B80;&#x5355;, &#x8FD9;&#x4E2A;&#x539F;&#x578B;&#x8D4B;&#x503C;&#x4FEE;&#x6539;&#x4E86;&#x6784;&#x9020;&#x51FD;&#x6570; <code>Person</code> &#x7684;&#x539F;&#x578B;&#x5BF9;&#x8C61;&#x7C7B;&#x578B;.</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Person</span>(<span class="hljs-params"></span>) </span>{ }

<span class="hljs-keyword">var</span> p1 = <span class="hljs-keyword">new</span> Person();

Person.prototype = { sayHello : <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;hello, &#x4F60;&#x597D; JavaScript!&quot;</span>);
}};

<span class="hljs-keyword">var</span> p2 = <span class="hljs-keyword">new</span> Person();

<span class="hljs-built_in">console</span>.log(p1.constructor); <span class="hljs-comment">// =&gt; function Person() { }</span>
<span class="hljs-built_in">console</span>.log(p2.constructor); <span class="hljs-comment">// =&gt; function Object() { [native code] }</span>
</code></pre>
<p>&#x53EF;&#x89C1;&#x4FEE;&#x6539;&#x540E;, &#x539F;&#x578B;&#x4E0D;&#x518D;&#x662F; <code>Person</code> &#x7C7B;&#x578B;&#x7684;&#x4E86;, &#x800C;&#x662F; <code>Object</code> &#x7C7B;&#x578B;.</p>
<h2 id="object-prototype">Object.prototype</h2>
<p>&#x5728; JavaScript &#x4E2D;, &#x6BCF;&#x4E00;&#x4E2A;&#x5BF9;&#x8C61;&#x90FD;&#x6709;&#x539F;&#x578B;. &#x800C;&#x4E14;&#x6BCF;&#x4E00;&#x4E2A;&#x539F;&#x578B;&#x90FD;&#x76F4;&#x63A5;, &#x6216;&#x95F4;&#x63A5;&#x7684;&#x7EE7;&#x627F;&#x81EA; <code>Object.prototype</code> &#x5BF9;&#x8C61;.</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Person</span>(<span class="hljs-params"></span>) </span>{}
</code></pre>
<p>&#x5B9A;&#x4E49;&#x4E86;&#x4E00;&#x4E2A;&#x6784;&#x9020;&#x51FD;&#x6570;, &#x90A3;&#x4E48;&#x4ED6;&#x5C31;&#x6709;&#x4E00;&#x4E2A; <code>Object</code> &#x7C7B;&#x578B;&#x7684;&#x539F;&#x578B;&#x5BF9;&#x8C61;&#x88AB;&#x8BBE;&#x7F6E;&#x7ED9;&#x4E86; <code>Person.prototype</code>.</p>
<pre><code class="lang-javascript"><span class="hljs-built_in">console</span>.log(Person.prototype);
<span class="hljs-built_in">console</span>.log(Person.prototype <span class="hljs-keyword">instanceof</span> <span class="hljs-built_in">Object</span>); <span class="hljs-comment">// =&gt; true</span>
<span class="hljs-comment">// note: &#x53EF;&#x89C1; Person.prototype &#x662F; Object &#x7C7B;&#x578B;&#x7684;</span>
</code></pre>
<p>&#x5982;&#x6B64;, &#x7531; <code>Person</code> &#x521B;&#x5EFA;&#x51FA;&#x6765;&#x7684;&#x5BF9;&#x8C61;&#x5C31;&#x7EE7;&#x627F;&#x81EA; <code>Object</code> &#x7C7B;&#x578B;&#x7684;&#x5BF9;&#x8C61;. &#x800C; <code>Person.prototype</code> &#x4E5F;&#x662F;&#x4E00;&#x4E2A;&#x5BF9;&#x8C61;. &#x81EA;&#x7136;&#x4E5F;&#x6709;&#x4E00;&#x4E2A;&#x539F;&#x578B;&#x5BF9;&#x8C61;.</p>
<p>&#x5728; Chrome &#x4E2D;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; <code>__proto__</code> &#x5F15;&#x7528;. &#x56E0;&#x6B64;&#x53EF;&#x4EE5;&#x83B7;&#x5F97; <code>Person.prototype</code> &#x7684;&#x539F;&#x578B;&#x5BF9;&#x8C61;</p>
<pre><code class="lang-javascript"><span class="hljs-built_in">console</span>.log(Person.prototype.__proto__); <span class="hljs-comment">// =&gt; Object {}</span>
</code></pre>
<p>&#x90A3;&#x4E48;&#x4ECE;&#x903B;&#x8F91;&#x4E0A;&#x5C31;&#x6709;&#x4E0B;&#x9762;&#x7684;&#x7EE7;&#x627F;&#x6A21;&#x578B;:</p>
<p><img src="../images/Snip20160211_47.png" alt=""></p>
<p>&#x9700;&#x8981;&#x6CE8;&#x610F;&#x7684;&#x662F;, <code>Object</code> &#x7C7B;&#x578B;&#x7684;&#x539F;&#x578B;&#x5BF9;&#x8C61;&#x7684;&#x539F;&#x578B;&#x5BF9;&#x8C61;&#x4E3A; <code>null</code>.</p>
<pre><code class="lang-javascript"><span class="hljs-built_in">console</span>.log(Person.prototype.__proto__.__proto__ === <span class="hljs-literal">null</span>);
<span class="hljs-comment">// =&gt; true</span>
</code></pre>
<h2 id="%E4%B8%80%E7%A7%8D%E7%BB%A7%E6%89%BF%E7%9A%84%E5%AE%9E%E7%8E%B0">&#x4E00;&#x79CD;&#x7EE7;&#x627F;&#x7684;&#x5B9E;&#x73B0;</h2>
<p>&#x6709;&#x4E86;&#x4E0A;&#x9762;&#x7684;&#x5206;&#x6790;, &#x5B9E;&#x73B0;&#x7EE7;&#x627F;&#x5C31;&#x53EF;&#x4EE5;&#x5206;&#x4E3A;&#x4E09;&#x4E2A;&#x6B65;&#x9AA4;:</p>
<ol>
<li>&#x83B7;&#x5F97;&#x6784;&#x9020;&#x51FD;&#x6570; <code>F</code></li>
<li>&#x8BBE;&#x7F6E; <code>F</code> &#x7684;&#x539F;&#x578B;&#x4E3A;&#x88AB;&#x7EE7;&#x627F;&#x7684;&#x5BF9;&#x8C61;</li>
<li>&#x7528; <code>F</code> &#x521B;&#x5EFA;&#x7EE7;&#x627F;&#x5BF9;&#x8C61;</li>
</ol>
<p>&#x7B80;&#x5355;&#x7684;&#x5B9E;&#x73B0;&#x4E3A;</p>
<pre><code class="lang-javascript"><span class="hljs-comment">// &#x88AB;&#x7EE7;&#x627F;&#x5BF9;&#x8C61;</span>
<span class="hljs-keyword">var</span> pareObj = {
    sayHello: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
        <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;Hello, jk&quot;</span>);
    }
};

<span class="hljs-comment">// &#x521B;&#x5EFA;&#x6784;&#x9020;&#x51FD;&#x6570;</span>
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">F</span>(<span class="hljs-params"></span>) </span>{
}

<span class="hljs-comment">// &#x8BBE;&#x7F6E;&#x539F;&#x578B;&#x5BF9;&#x8C61;</span>
F.prototype = pareObj;

<span class="hljs-comment">// &#x521B;&#x5EFA;&#x7EE7;&#x627F;&#x5BF9;&#x8C61;</span>
<span class="hljs-keyword">var</span> obj = <span class="hljs-keyword">new</span> F();
</code></pre>
<p>&#x4F46;&#x662F;&#x8FD9;&#x4E48;&#x5199;&#x592A;&#x8FC7;&#x4E8E;&#x7E41;&#x7410;, &#x56E0;&#x6B64;&#x5927;&#x5E08; Douglas Crockford &#x5728;&#x4ED6;&#x7684; &#x300A;JavaScript: The Good Parts&#x300B;&#x4E2D;&#x7ED9;&#x51FA;&#x4E86;&#x4E0B;&#x9762;&#x7684;&#x505A;&#x6CD5;:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">if</span> (!<span class="hljs-built_in">Object</span>.create) { <span class="hljs-comment">// ECMAScript 5 &#x4E2D;&#x5DF2;&#x7ECF;&#x652F;&#x6301;&#x8BE5;&#x65B9;&#x6CD5;</span>
    <span class="hljs-built_in">Object</span>.prototype.create = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">pare</span>) </span>{
        <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">F</span>(<span class="hljs-params"></span>) </span>{}
        F.prototype = pare;
        <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> F();
    }
}
</code></pre>
<h2 id="%E5%B0%8F%E7%BB%93">&#x5C0F;&#x7ED3;</h2>
<ul>
<li>&#x6240;&#x8C13;&#x7EE7;&#x627F;&#x5C31;&#x662F;&#x62FF;&#x6765;&#x4E3B;&#x4E49;, &#x5C06;&#x91CD;&#x590D;&#x7684;&#x4E1C;&#x897F;&#x8FDB;&#x884C;&#x590D;&#x7528;</li>
<li>JavaScript &#x4E2D;&#x7EE7;&#x627F;&#x5C31;&#x662F;&#x7ED9;&#x6784;&#x9020;&#x51FD;&#x6570;&#x7684; <code>prototype</code> &#x8BBE;&#x7F6E;&#x5BF9;&#x8C61;</li>
<li>&#x6BCF;&#x4E00;&#x4E2A;&#x5BF9;&#x8C61;&#x90FD;&#x6709;&#x4E00;&#x4E2A;&#x539F;&#x578B;&#x5BF9;&#x8C61;</li>
<li>&#x4E00;&#x4E2A;&#x7ECF;&#x5178;&#x7684;&#x7EE7;&#x627F;&#x65B9;&#x6CD5;</li>
</ul>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../e9c9c586570ff813bf127694b025d155/40a6014bee4d6724e7aa800253818de5.html" class="navigation navigation-prev " aria-label="Previous page: 原型的基本概念"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../e9c9c586570ff813bf127694b025d155/9c3f525ec8bdda16f7618bcb3c936b98.html" class="navigation navigation-next " aria-label="Next page: Object 对象"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

<script>
require(["gitbook"], function(gitbook) {
    var config = {"fontSettings":{"theme":null,"family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
